package org.visionlibrary.image.filters.edge;

import java.awt.Point;

import org.visionlibrary.image.model.ConvolutionKernel;


public class SobelCompassEdgeDetector extends CompassEdgeDetector {
	public SobelCompassEdgeDetector() {
		kernels = new ConvolutionKernel[8];
		kernels[0] = new ConvolutionKernel(3, 3, 
				new float[] {-1, 0, 1, -2, 0, 2, -1, 0, 1},
				1, new Point(1,1));
		
		kernels[1] = new ConvolutionKernel(3, 3, 
				new float[] {0, 1, 2, -1, 0, 1, -2, -1, 0},
				1, new Point(1,1));
		
		kernels[2] = new ConvolutionKernel(3, 3, 
				new float[] {1, 2, 1, 0, 0, 0, -1, -2, -1},
				1, new Point(1,1));
		
		kernels[3] = new ConvolutionKernel(3, 3, 
				new float[] {2, 1, 0, 1, 0, -1, 0, -1, -2},
				1, new Point(1,1));
		
		kernels[4] = new ConvolutionKernel(3, 3, 
				new float[] {1, 0, -1, 2, 0, -2, 1, 0, -1},
				1, new Point(1,1));
		
		kernels[5] = new ConvolutionKernel(3, 3, 
				new float[] {0, -1, -2, 1, 0, -1, 2, 1, 0},
				1, new Point(1,1));
		
		kernels[6] = new ConvolutionKernel(3, 3, 
				new float[] {-1, -2, -1, 0, 0, 0, 1, 2, 1},
				1, new Point(1,1));
		
		kernels[7] = new ConvolutionKernel(3, 3, 
				new float[] {-2, -1, 0, -1, 0, 1, 0, 1, 2},
				1, new Point(1,1));
	}
}  
